package com.firebird.oms.domain.sm;

// Generated 2009-12-2 18:25:47 by Hibernate Tools 3.2.5.Beta

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * TismCombo generated by hbm2java
 */
@Entity
@Table(name = "tism_combo")
public class TismCombo implements java.io.Serializable {

	private static final long serialVersionUID = 5956647112500862758L;
	private Integer comboId;
	private String comboName;
	private String comboDesc;
	private Integer prodType;
	private Integer upComboId;
	private Integer isBottom;
	private Integer state;
	private String attr;

	public TismCombo() {
	}

	public TismCombo(String comboName, Integer isBottom, Integer state,
			String attr) {
		this.comboName = comboName;
		this.isBottom = isBottom;
		this.state = state;
		this.attr = attr;
	}

	public TismCombo(String comboName, String comboDesc, Integer upComboId,
			Integer isBottom, Integer state, String attr) {
		this.comboName = comboName;
		this.comboDesc = comboDesc;
		this.upComboId = upComboId;
		this.isBottom = isBottom;
		this.state = state;
		this.attr = attr;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "combo_id", unique = true, nullable = false)
	public Integer getComboId() {
		return this.comboId;
	}

	public void setComboId(Integer comboId) {
		this.comboId = comboId;
	}

	@Column(name = "combo_name", nullable = false, length = 250)
	public String getComboName() {
		return this.comboName;
	}

	public void setComboName(String comboName) {
		this.comboName = comboName;
	}

	@Column(name = "combo_desc", length = 65535)
	public String getComboDesc() {
		return this.comboDesc;
	}

	public void setComboDesc(String comboDesc) {
		this.comboDesc = comboDesc;
	}
	
	@Column(name = "prod_type", nullable = false)
	public Integer getProdType() {
		return prodType;
	}

	public void setProdType(Integer prodType) {
		this.prodType = prodType;
	}

	@Column(name = "up_combo_id")
	public Integer getUpComboId() {
		return this.upComboId;
	}

	public void setUpComboId(Integer upComboId) {
		this.upComboId = upComboId;
	}

	@Column(name = "is_bottom", nullable = false)
	public Integer getIsBottom() {
		return this.isBottom;
	}

	public void setIsBottom(Integer isBottom) {
		this.isBottom = isBottom;
	}

	@Column(name = "state", nullable = false)
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "attr", nullable = false, length = 10)
	public String getAttr() {
		return this.attr;
	}

	public void setAttr(String attr) {
		this.attr = attr;
	}

	public boolean equals(final Object other) {
		if (!(other instanceof TismCombo))
			return false;
		TismCombo castOther = (TismCombo) other;
		return new EqualsBuilder().append(comboId, castOther.comboId).append(
				comboName, castOther.comboName).append(comboDesc,
				castOther.comboDesc).append(upComboId, castOther.upComboId)
				.append(isBottom, castOther.isBottom).append(state,
						castOther.state).append(attr, castOther.attr)
				.isEquals();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(comboId).append(comboName).append(
				comboDesc).append(upComboId).append(isBottom).append(state)
				.append(attr).toHashCode();
	}

	public String toString() {
		return new ToStringBuilder(this).append("comboId", comboId).append(
				"comboName", comboName).append("comboDesc", comboDesc).append(
				"upComboId", upComboId).append("isBottom", isBottom).append(
				"state", state).append("attr", attr).toString();
	}

}
